package com.song;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DemoMain {
	
	
	public static void main(String[] args) {
		  ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(  
	                new String[] { "applicationContext.xml" });  
	        context.start();  
	  
	        DemoService demoService = (DemoService) context.getBean("demoService");  
	        String hello = demoService.sayHello("tom");  
	        System.out.println(hello); 
	        
	}
}
